<?php
namespace Home\Controller;

use Think\Controller;
use EasyWeChat\Factory;

class IndexController extends Controller
{
    public function index()
    {


		$config = [
			'app_id' => 'wx3cf0f39249eb0exx',
			'secret' => 'f1c242f4f28f735d4687abb469072axx',

			// 指定 API 调用返回结果的类型：array(default)/collection/object/raw/自定义类名
			'response_type' => 'array',

			'log' => [
				'level' => 'debug',
				'file' => __DIR__.'/wechat.log',
			],
		];

		$app = Factory::officialAccount($config);
		dump($app);
	}
}